lib/checkout: For "process whiteouts" mode, replace directories too
authorColin Walters <walters@verbum.org>
Thu, 19 Oct 2017 15:18:00 +0000 (11:18 -0400)
committerAtomic Bot <atomic-devel@projectatomic.io>
Fri, 20 Oct 2017 13:20:27 +0000 (13:20 +0000)
commitb8251d26bd22338ca65a9ea52c6ca5107e572738
treeb0f017edb07b4f2dc8085a4b393b91815dd15a1c
parent9166605e5acbffd2c4db4e8a374770830f900fbc
lib/checkout: For "process whiteouts" mode, replace directories too

I'm playing around with some ostree ⇔ OCI/Docker bits, and ran
into this while importing an OCI image that built from the Fedora
base image where `/home` is a regular directory, and I added a layer
that did the ostree bits of moving it to `/var` and leaving a symlink.

OCI/Docker supports this.  Now since "process whiteouts" is really the
"enable OCI/Docker" mode, let's only replace dirs if that's enabled.
This leaves the `UNION_FILES` targeted for its original use case
which is unioning components/packages.  (Although that use case itself
is now a bit superceded by `UNION_IDENTICAL`, but eh).

Closes: #1294
Approved by: jlebon
src/libostree/ostree-repo-checkout.c
src/libostree/ostree-repo.h
tests/basic-test.sh